package com.allwees.bs.module.fms.entity;

import com.allwees.bs.core.modelbase.entity.BaseEntity;
import com.allwees.bs.module.core.constant.EWithdrawAccountChannel;
import com.allwees.core.common.constant.EWithdrawAccountType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.Column;

/**
 * 提现账户基类
 *
 * @author yangylsky
 * @since 2019-12-12
 *
 */
@Data
@ToString
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public abstract class BaseWithdrawAccount extends BaseEntity {
	@Column(length = 48)
	private String branchUuid;

    protected EWithdrawAccountChannel channel;

    protected EWithdrawAccountType type;

	/**
	 * 姓名/公司名称
	 */
	@Column(length = 48)
    private String name;

    /**
     * 身份证号/组织机构代码
     */
	@Column(length = 48)
    private String idNo;

    /**
     * 平台账号
     */
	@Column(length = 32)
    private String accountNo;

    /**
     * 收款银行
     */
	@Column(length = 48)
    private String bankName;

    /**
     * 收款银行代码
     */
	@Column(length = 48)
    private String bankCode;

    /**
     * 收款银行帐号
     */
	@Column(length = 48)
    private String bankAccountNo;

    /**
     * 支行名称
     */
    private String branchBank;

    /**
     * 支行地址
     */
    private String branchBankLocation;

    /**
     * 是否是默认账户
     */
    private Boolean isDefault;

    public String getTypeDesc() {
        return type.desc();
    }
}
